using System.Collections;
using NodeCanvas.Variables;

namespace NodeCanvas.Actions
{
	public class ITweenRotate : ITweenActions
	{
		public enum RotateType
		{
			RotateTo = 0,
			RotateFrom = 1
		}

		public RotateType rotateType;

		public BBVector targetRotation;

		private Hashtable hash;

		protected override string info
		{
			get
			{
				return "Tween " + rotateType.ToString() + targetRotation;
			}
		}

		protected override void OnExecute()
		{
			hash = iTween.Hash("rotation", targetRotation.value, "name", id.value, "delay", delay.value, "time", time.value, "easetype", easeType);
			if (rotateType == RotateType.RotateTo)
			{
				iTween.RotateTo(base.agent.gameObject, hash);
			}
			else
			{
				iTween.RotateFrom(base.agent.gameObject, hash);
			}
			base.OnExecute();
		}
	}
}
